#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<hkvfs_ctrl.h>
#include<comm_define.h>

struct hkvfs_ctrl *hkvfs_init(char *fsname,int32_t seg_size,int32_t block_size)
{
      struct hkvfs_ctrl* ctrl;
      struct super_block* sb;
      char *fs_name=fsname;
      sb=(struct  super_block*)malloc(sizeof(struct  super_block));
      sb->seg_size=seg_size;
      sb->block_size=block_size;
      //sb->fsname=malloc(sizeof(char)*MAX_FILE_NAME_LEN);
      sb->fsname=fs_name;
      ctrl=(struct  hkvfs_ctrl *)malloc(sizeof(struct hkvfs_ctrl));
      ctrl->last_segno=UN_SET;
      ctrl->last_offset=UN_SET;
      ctrl->sb=sb;
      printf("%d,%d\n",ctrl->sb->seg_size,ctrl->sb->block_size);
      return ctrl;     
     
}
main()
{
    struct  hkvfs_ctrl* ctrl=hkvfs_init("hkvfs",(1024/8)*64,8);
}
